﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
     //成员变量
    internal class AreaClum
    {
        //成员变量
        double length;
        double width;

        // 给变量初始化
        public void setValue() { 
            length = 4.2;
            width = 3.2;
        }

        // 计算面积
        public double areaClum() {

            return length * width;
        }
        //展示计算结果
        public void display() {
            Console.WriteLine("长度为：{0}", length);
            Console.WriteLine("宽度为：{0}", width);
            Console.WriteLine("面积为：{0}", areaClum());
        }



    }

    class ExcuteRectangle
    {
        public static void Main(string[] args)
        {

            AreaClum r = new AreaClum();
            r.setValue();
            r.areaClum();
            r.display();
            Console.ReadLine();

        }
    }
}
